/*
 * @Author: hy
 * @Date: 2018-05-02 09:52:10
 * @Last Modified by: hy
 * @Last Modified time: 2018-05-16 21:31:03b4038
 */

// page-demo

import React, { Component } from 'react'
import { WingBlank, WhiteSpace, Tabs } from 'antd-mobile'
import NavBar from '@components/navbar'
import { withRouter } from 'react-router-dom'

@withRouter
export default class Home extends Component {
  constructor(props) {
    super(props)
    this.state = {

    }
  }

  render() {
    const { location = {} } = this.props
    const { pathname } = location
    const title = 'page-demo'
    const tabs = [
      { title: '购彩', sub: '1' },
      { title: '开奖', sub: '2' },
    ];
    return (
      <div className="page-box">
        <NavBar
          left={<span className="app-icon icon-left" onClick={this.props.history.goBack} />}
          title={title}
        />
        <div className="page-content">
          <Tabs tabs={tabs}
            initialPage={1}
            onChange={(tab, index) => { console.log('onChange', index, tab); }}
            onTabClick={(tab, index) => { console.log('onTabClick', index, tab); }}
          >
            <div>
             购彩页面
            </div>
            <div>
              开奖页面
            </div>
          </Tabs>
        </div>
      </div>
    )
  }
}
